import request from '@/utils/request'

// 查询我的反馈列表
export function listMyCallback(userName) {
  return request({
    url: '/callback/myList/' + userName,
    method: 'get',
  })
}

// 查询全部反馈列表
export function listAllCallback(query) {
  return request({
    url: '/callback/allList',
    method: 'get',
    params: query
  })
}

// 查询反馈详细
export function getCallback(callbackId) {
  return request({
    url: '/callback/' + callbackId,
    method: 'get'
  })
}

// 新增反馈
export function addCallback(data) {
  return request({
    url: '/callback',
    method: 'post',
    data: data
  })
}

// 修改反馈
export function updateCallback(data) {
  return request({
    url: '/callback',
    method: 'put',
    data: data
  })
}

// 删除反馈
export function delCallback(callbackId) {
  return request({
    url: '/callback/' + callbackId,
    method: 'delete'
  })
}
